# 鸡兔同笼:今有鸡兔同笼,上有三十五头,下有百足,问鸡兔各几何?

# x(chicken)   y(rabbit)
# x + y = 35  ----> x = 35- y
# 2*x + 4*y = 100   -----> 2*(35- y)+ 4*y = 100
# ------> y = 15   x = 20

# 定义变量接收用户数据
head = eval(input("Enter head number : "))
foot = eval(input("Enter foot number : "))

chicken = 2 * head - foot / 2
rabbit = foot / 2 - head

print(f"chicken = {chicken},rabbit = {rabbit}")
